//
//  TopUsers.m
//  yuimall_Iphone
//
//  Created by Gang.Wang on 12-5-10.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "TopUsers.h"
#import "header.h"

@implementation TopUsers

@synthesize users = users_;

- (void) dealloc
{
    YRelease(users_);
    [super dealloc];
}

-(void) privateInit
{
    NSMutableArray * temp_users = [[NSMutableArray alloc] init];
    
    for (XMLParsedTree * subTree in [self.xmlTree childrenTreeAtPath:@"users_get_response/users" nodeName:@"user"]) 
    {
        TopUser * tmpUser = [[TopUser alloc] initWithXmlTree:subTree];
      [temp_users addObject:tmpUser];
       YRelease(tmpUser);
    }
    
    
    self.users = temp_users;
    YRelease(temp_users)
}


-(id) initWithXmlTree:(XMLParsedTree *)tree
{
    self = [super initWithXmlTree:tree];
    if (self) {
        [self privateInit];
    }
    
    return self;
}


-(id) initWithXmlString:(NSString *)xmlString
{
    self = [super initWithXmlString:xmlString];
    if (self) {
        [self privateInit];
    }
    return self;
}

-(id) initWithXmlData:(NSData *)xmlData
{
    self = [super initWithXmlData:xmlData];
    if (self) {
        [self privateInit];
    }
    return self;
}

@end
